﻿package net.cooltain.warhammer.framework.constant;

import java.util.HashMap;
import java.util.Map;

import net.cooltain.warhammer.running.entity.MotionPlayerZone;
import net.cooltain.warhammer.running.entity.ZoneEntity;

public class ConstantPlayZone extends Constants{
	
	public static final String BATTLE_ZONE_CN = "战场区";
	public static final String KINDOM_ZONE_CN = "王国区";
	public static final String QUEST_ZONE_CN  = "任务区";
	public static final String CAPITAL_ZONE_CN= "首都区";
	public static final String HAND_ZONE_CN   = "手牌";
	public static final String DESK_ZONE_CN   = "抽牌堆";
	public static final String DISCARD_ZONE_CN= "弃牌堆";
	public static final String OUTSIDE_ZONE_CN= "移出游戏";
	
	public static final Integer BATTLE_ZONE = 0;
	public static final Integer KINDOM_ZONE = 1;
	public static final Integer QUEST_ZONE  = 2;
	public static final Integer CAPITAL_ZONE= 3;
	
	public static final Integer ALL_ZONE_ALLOW = -1;
	
	public static final Integer BATTLE_ZONE_LIMIT = BATTLE_ZONE;
	public static final Integer KINDOM_ZONE_LIMIT = KINDOM_ZONE;
	public static final Integer QUEST_ZONE_LIMIT  = QUEST_ZONE;
	public static final Integer CAPITAL_ZONE_LIMIT= CAPITAL_ZONE;
	
	
	public static final Integer HAND_ZONE = 4;
	public static final Integer DESK_ZONE = 5;
	public static final Integer DISCARD_ZONE = 6;
	public static final Integer OUTSIDE_ZONE = 7;


	/** 所有区域 */
	public static Map<Integer,String> allZone = new HashMap<Integer,String>(8) ;
	
	/** 设施可被放置的区域 */
	public static Map<Integer,String> developerAllowZone = new HashMap<Integer,String>(3) ;

	/** 非设施卡牌可被放置的区域 */
	public static Map<Integer,String> normalCardAllowZone = new HashMap<Integer,String>(4) ;
	
	static {
		allZone.put(BATTLE_ZONE,BATTLE_ZONE_CN);
		allZone.put(KINDOM_ZONE,KINDOM_ZONE_CN);
		allZone.put(QUEST_ZONE ,QUEST_ZONE_CN);
		allZone.put(CAPITAL_ZONE ,CAPITAL_ZONE_CN);
		allZone.put(HAND_ZONE ,HAND_ZONE_CN);
		allZone.put(DESK_ZONE ,DESK_ZONE_CN);
		allZone.put(DISCARD_ZONE ,DISCARD_ZONE_CN);
		allZone.put(OUTSIDE_ZONE ,OUTSIDE_ZONE_CN);
		
		developerAllowZone.put(BATTLE_ZONE,BATTLE_ZONE_CN);
		developerAllowZone.put(KINDOM_ZONE,KINDOM_ZONE_CN);
		developerAllowZone.put(QUEST_ZONE ,QUEST_ZONE_CN);
		
		normalCardAllowZone.put(BATTLE_ZONE,BATTLE_ZONE_CN);
		normalCardAllowZone.put(KINDOM_ZONE,KINDOM_ZONE_CN);
		normalCardAllowZone.put(QUEST_ZONE ,QUEST_ZONE_CN);
		normalCardAllowZone.put(CAPITAL_ZONE ,CAPITAL_ZONE_CN);
	}
	
	/**
	 * 提供给MotionPlayerZone使用的对象
	 * @param player
	 * @return
	 */
	public static Map<Integer,ZoneEntity> initAllPlayZone(MotionPlayerZone player){
		Map<Integer,ZoneEntity> map = new HashMap<Integer, ZoneEntity>(7);
		map.put(BATTLE_ZONE, player.battleZone);
		map.put(KINDOM_ZONE, player.kingdomZone);
		map.put(QUEST_ZONE , player.questZone);
		map.put(CAPITAL_ZONE ,player.capitalZone);
		map.put(HAND_ZONE  , player.handZone);
		map.put(DESK_ZONE  , player.deskZone);
		map.put(DISCARD_ZONE ,player.discardPile);
		return map;
	}
}
